SDK/J Authentication Package ver1.0
RICOH Confidential

jp.co.ricoh.dsdk.scard.option.file
Interface FileAccessService

All Superinterfaces:
CHVCallbackService, SecureService
All Known Subinterfaces:
FileSystemService

public interface FileAccessService
extends CHVCallbackService, SecureService

This is a CardService interface which provides the access to a file or a directory on the card.


Method Summary
 void appendRecord(FilePath file, byte[] data)
           Appends a data to the file.
 boolean exists(FilePath file)
           Checks whether the file exists.
 FileInfo getFileInfo(FilePath file)
           Returns the information about the file.
 FilePath getRoot()
           Returns the path of the master file.
 byte[] read(FilePath file, int offset, int length)
           Reads data from the file.
 byte[] readRecord(FilePath file)
           Reads the current record.
 byte[] readRecord(FilePath file, int number)
           Reads a record with the given record number.
 byte[][] readRecords(FilePath file, int count)
           Reads consecutive records from the current record.
 byte[][] readRecords(FilePath file, int number, int count)
           Reads consecutive records from the given record number.
 void write(FilePath file, int offset, byte[] data)
           Writes a data to the file.
 void writeRecord(FilePath file, byte[] data)
           Writed a data to the current record.
 void writeRecord(FilePath file, int number, byte[] data)
           Writes a data to the given record.
 
Methods inherited from interface jp.co.ricoh.dsdk.scard.option.security.CHVCallbackService
setCallback
 
Methods inherited from interface jp.co.ricoh.dsdk.scard.option.security.SecureService
provideCredentials
 

Method Detail

appendRecord

public void appendRecord(FilePath file,
                         byte[] data)
                  throws VerificationException,
                         CardServiceException
Appends a data to the file.

Parameters:
file - the path to the file.
data - the data to be written.
Throws:
VerificationException - if the verification failed.
CardServiceException - if the service encountered an error.
See Also:
VerificationException

exists

public boolean exists(FilePath file)
               throws CardServiceException
Checks whether the file exists.

Parameters:
file - the path to the file.
Returns:
true if the file exists.
Throws:
CardServiceException - if the service encountered an error.

getFileInfo

public FileInfo getFileInfo(FilePath file)
                     throws VerificationException,
                            CardServiceException
Returns the information about the file.

Parameters:
file - the path to the file.
Returns:
the information about the file.
Throws:
VerificationException - if the verification failed.
CardServiceException - if the service encountered an error.
See Also:
VerificationException

getRoot

public FilePath getRoot()
Returns the path of the master file.

Returns:
the path of the master file.

read

public byte[] read(FilePath file,
                   int offset,
                   int length)
            throws VerificationException,
                   CardServiceException
Reads data from the file.

Parameters:
file - the path of the file.
offset - the index of the first byte to be read.
length - the number of bytes to read.
Returns:
a data read from the file.
Throws:
VerificationException - if the verification failed.
CardServiceException - if the service encounterd an error.
See Also:
VerificationException

readRecord

public byte[] readRecord(FilePath file)
                  throws VerificationException,
                         CardServiceException
Reads the current record.

Parameters:
file - the path of the file.
Returns:
a record read from the file.
Throws:
VerificationException - if the verification failed.
CardServiceException - if the service encountered an error.
See Also:
VerificationException

readRecords

public byte[][] readRecords(FilePath file,
                            int count)
                     throws VerificationException,
                            CardServiceException
Reads consecutive records from the current record.

Parameters:
file - the path of the file.
count - the number of records to be read.
Returns:
records read.
Throws:
VerificationException - if the verification failed.
CardServiceException - if the service encountered an error.
See Also:
VerificationException

readRecord

public byte[] readRecord(FilePath file,
                         int number)
                  throws VerificationException,
                         CardServiceException
Reads a record with the given record number.

Parameters:
file - the path of the file.
number - the record number.
Returns:
a record read from the file.
Throws:
VerificationException - if the verification failed.
CardServiceException - if the service encountered an error.
See Also:
VerificationException

readRecords

public byte[][] readRecords(FilePath file,
                            int number,
                            int count)
                     throws VerificationException,
                            CardServiceException
Reads consecutive records from the given record number.

Parameters:
file - the path of the file.
number - the index of the record to be read.
count - the number of records to be read.
Returns:
records read .
Throws:
VerificationException - if the verification failed.
CardServiceException - if the service encountered an error.
See Also:
VerificationException

write

public void write(FilePath file,
                  int offset,
                  byte[] data)
           throws VerificationException,
                  CardServiceException
Writes a data to the file.

Parameters:
file - the path of the file.
offset - the index of the first byte to be written.
data - a data to be written.
Throws:
VerificationException - if the verification failed.
CardServiceException - if the service encountered an error.
See Also:
VerificationException

writeRecord

public void writeRecord(FilePath file,
                        byte[] data)
                 throws VerificationException,
                        CardServiceException
Writed a data to the current record.

Parameters:
file - the path of the file.
data - a data to be written.
Throws:
VerificationException - if the verification failed.
CardServiceException - if the service encountered an error.
See Also:
VerificationException

writeRecord

public void writeRecord(FilePath file,
                        int number,
                        byte[] data)
                 throws VerificationException,
                        CardServiceException
Writes a data to the given record.

Parameters:
file - the path of the file.
number - the record number.
data - a data to be written.
Throws:
VerificationException - if the verification failed.
CardServiceException - if the service encountered an error.
See Also:
VerificationException

SDK/J Authentication Package ver1.0
RICOH Confidential